/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package org.hl7.v3;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.eclipse.emf.common.util.Enumerator;

/**
 * <!-- begin-user-doc -->
 * A representation of the literals of the enumeration '<em><b>Text Media Type</b></em>',
 * and utility methods for working with them.
 * <!-- end-user-doc -->
 * <!-- begin-model-doc -->
 * abstDomain: A14825 (C-0-T14824-A14825-cpt)
 * <!-- end-model-doc -->
 * @see org.hl7.v3.V3Package#getTextMediaType()
 * @model extendedMetaData="name='TextMediaType'"
 * @generated
 */
public enum TextMediaType implements Enumerator {
	/**
	 * The '<em><b>Text XHl7 Ft</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #TEXT_XHL7_FT_VALUE
	 * @generated
	 * @ordered
	 */
	TEXT_XHL7_FT(0, "textXHl7Ft", "text/x-hl7-ft"),

	/**
	 * The '<em><b>Text Html</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #TEXT_HTML_VALUE
	 * @generated
	 * @ordered
	 */
	TEXT_HTML(1, "textHtml", "text/html"),

	/**
	 * The '<em><b>Text Plain</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #TEXT_PLAIN_VALUE
	 * @generated
	 * @ordered
	 */
	TEXT_PLAIN(2, "textPlain", "text/plain"),

	/**
	 * The '<em><b>Text Rtf</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #TEXT_RTF_VALUE
	 * @generated
	 * @ordered
	 */
	TEXT_RTF(3, "textRtf", "text/rtf"),

	/**
	 * The '<em><b>Text Sgml</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #TEXT_SGML_VALUE
	 * @generated
	 * @ordered
	 */
	TEXT_SGML(4, "textSgml", "text/sgml"),

	/**
	 * The '<em><b>Text Xml</b></em>' literal object.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #TEXT_XML_VALUE
	 * @generated
	 * @ordered
	 */
	TEXT_XML(5, "textXml", "text/xml");

	/**
	 * The '<em><b>Text XHl7 Ft</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Text XHl7 Ft</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #TEXT_XHL7_FT
	 * @model name="textXHl7Ft" literal="text/x-hl7-ft"
	 * @generated
	 * @ordered
	 */
	public static final int TEXT_XHL7_FT_VALUE = 0;

	/**
	 * The '<em><b>Text Html</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Text Html</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #TEXT_HTML
	 * @model name="textHtml" literal="text/html"
	 * @generated
	 * @ordered
	 */
	public static final int TEXT_HTML_VALUE = 1;

	/**
	 * The '<em><b>Text Plain</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Text Plain</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #TEXT_PLAIN
	 * @model name="textPlain" literal="text/plain"
	 * @generated
	 * @ordered
	 */
	public static final int TEXT_PLAIN_VALUE = 2;

	/**
	 * The '<em><b>Text Rtf</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Text Rtf</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #TEXT_RTF
	 * @model name="textRtf" literal="text/rtf"
	 * @generated
	 * @ordered
	 */
	public static final int TEXT_RTF_VALUE = 3;

	/**
	 * The '<em><b>Text Sgml</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Text Sgml</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #TEXT_SGML
	 * @model name="textSgml" literal="text/sgml"
	 * @generated
	 * @ordered
	 */
	public static final int TEXT_SGML_VALUE = 4;

	/**
	 * The '<em><b>Text Xml</b></em>' literal value.
	 * <!-- begin-user-doc -->
	 * <p>
	 * If the meaning of '<em><b>Text Xml</b></em>' literal object isn't clear,
	 * there really should be more of a description here...
	 * </p>
	 * <!-- end-user-doc -->
	 * @see #TEXT_XML
	 * @model name="textXml" literal="text/xml"
	 * @generated
	 * @ordered
	 */
	public static final int TEXT_XML_VALUE = 5;

	/**
	 * An array of all the '<em><b>Text Media Type</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private static final TextMediaType[] VALUES_ARRAY =
		new TextMediaType[] {
			TEXT_XHL7_FT,
			TEXT_HTML,
			TEXT_PLAIN,
			TEXT_RTF,
			TEXT_SGML,
			TEXT_XML,
		};

	/**
	 * A public read-only list of all the '<em><b>Text Media Type</b></em>' enumerators.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static final List<TextMediaType> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));

	/**
	 * Returns the '<em><b>Text Media Type</b></em>' literal with the specified literal value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static TextMediaType get(String literal) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			TextMediaType result = VALUES_ARRAY[i];
			if (result.toString().equals(literal)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Text Media Type</b></em>' literal with the specified name.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static TextMediaType getByName(String name) {
		for (int i = 0; i < VALUES_ARRAY.length; ++i) {
			TextMediaType result = VALUES_ARRAY[i];
			if (result.getName().equals(name)) {
				return result;
			}
		}
		return null;
	}

	/**
	 * Returns the '<em><b>Text Media Type</b></em>' literal with the specified integer value.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public static TextMediaType get(int value) {
		switch (value) {
			case TEXT_XHL7_FT_VALUE: return TEXT_XHL7_FT;
			case TEXT_HTML_VALUE: return TEXT_HTML;
			case TEXT_PLAIN_VALUE: return TEXT_PLAIN;
			case TEXT_RTF_VALUE: return TEXT_RTF;
			case TEXT_SGML_VALUE: return TEXT_SGML;
			case TEXT_XML_VALUE: return TEXT_XML;
		}
		return null;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final int value;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String name;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private final String literal;

	/**
	 * Only this class can construct instances.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	private TextMediaType(int value, String name, String literal) {
		this.value = value;
		this.name = name;
		this.literal = literal;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public int getValue() {
	  return value;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getName() {
	  return name;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String getLiteral() {
	  return literal;
	}

	/**
	 * Returns the literal value of the enumerator, which is its string representation.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public String toString() {
		return literal;
	}
	
} //TextMediaType
